﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="authors-list.aspx.cs" Inherits="DeansWsccProject.authors_list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <h1>List of Authors</h1>
    <asp:GridView ID="authorsGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="profileUserName" OnRowDataBound="authorsGridView_RowDataBound">
        <Columns>
            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Author">
                <ItemTemplate>
                    <br />
                    <a href='/profile.aspx?profileUserName=<%# Eval("profileUserName") %>'><img class="profileImage" src='/<%# Eval("Picture") %>' alt="Image Unvailable" /></a>
                    <br />
                    <a href='/profile.aspx?profileUserName=<%# Eval("profileUserName") %>'><%# Eval("FirstName") %> <%# Eval("LastName") %></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Authored eBooks">
                <ItemTemplate>
                    <asp:Repeater ID="authoredEBooksRepeater" runat="server">
                        <ItemTemplate>
                            <a href='/details.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "ID") %>'><img class="eBookImage" src='/<%# DataBinder.Eval(Container.DataItem, "eBookImage") %>' alt="Image Unvailable" title='<%# DataBinder.Eval(Container.DataItem, "eBookTitle") %>'/></a>
                        </ItemTemplate>
                    </asp:Repeater>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>

